Field of the Invention
This invention generally relates to adaptive computer systems. More specifically, the invention relates to a flexible performance multi-predictor that solves the problem of providing accurate future behavior predictions for adaptive reconfiguration systems.
Adaptive computer systems attempt to improve performance and/or reduce power consumption by periodically reconfiguring the system according to the current resource requirements and/or characteristics of the running workload. Such reconfiguration may be a reconfiguration of the hardware, such as the resizing of computer resources (e.g., resizing of caches or issue width), or it may be a reconfiguration of the software (dynamic optimization), such as the tuning of a process or thread scheduling policy. The reconfiguration logic may be implemented in software or in hardware.
The purpose of the reconfiguration is to exploit the variability of behavior in a running workload to improve performance or to reduce power. For example, if the workload currently under-or over-utilizes certain hardware structures, hardware reconfiguration may down-or upsize them. Software reconfiguration logic may reconfigure the workload through scheduling decisions to better exploit the available hardware. In either case, the reconfiguration logic can initiate a reconfiguration based on observed or expected changes in the running workload characteristics.
A common way to assess workload characteristics is through hardware performance counters. These counters are typically available on modem microprocessors to provide statistics about resource usage and workload composition. However, hardware counters only provide characterization post-mortem; that is, after the behavior has been observed. In order to effectively reconfigure a computer system, reconfiguration decisions should be based on future rather than past behavior.
Various reconfiguration solutions that have been pursued in the past are reactive (rather than predictive) adaptive systems. In a reactive adaptive system, the reconfiguration logic tracks current workload characteristics either through existing hardware counters or through specialized tracking hardware. If it is found that the current behavior deviates from the behavior at the last system reconfiguration by more than a threshold value, a new reconfiguration is triggered to match the changed workload characteristics. Such a reactive strategy works well if the workload behavior is relatively stable with few distinct behavior changes. However, in a workload that is characterized by high variability, a reactive system will always lag behind the latest behavior changes and thus never reach an optimal configuration for the current behavior.
One prior approach that attempts to make predictive rather than reactive reconfiguration decisions is disclosed in “Phase Tracking and Prediction,” In Proceedings of the 30th Annual International Symposium on Computer Architecture (ISCA), Jun. 9–11, 2003, by T. Sherwood, S. Sair and B. Calder (Sherwood, et al.). In this approach, a dedicated hardware structure is developed to track the so called basic block vectors. Basic block vectors are used to determine where in the program code the current workload executes. Assuming that workload behavior is a function of the current basic block vector, a classification scheme is used to classify different basic block vectors into different phases and each phase is associated with a particular value of the performance metric one wishes to predict. The dedicated hardware structure includes logic for predicting the next phase (in terms of the basic block vectors) using a Markov model predictor. The performance value associated with the predicted next phase is then used to reconfigure the adaptive system.
One limitation of this approach is that it requires specialized dedicated hardware structures. Moreover, the system disclosed in Sherwood, et al. is based on an assumption that if one metric is stable, other metrics are also stable. This assumption limits the prediction accuracy of the Sherwood, et al. approach.
There also has been a large body of related work on predicting branch outcome in a running computer program. Branch predictors generally use some form of a hash table that stores predicted branch outcome based on a specific history of branches that have most recently executed. Branch predictors predict the outcome of a specific event (the execution of a specific branch. However, branch predictors only predict branch outcomes based on branch execution history.